# coding=utf-8
import math

a = int(input())
b = []
for i in range(2, int(math.sqrt(a)) + 1):

    while a % i == 0:
        b.append(i)
        a = int(a / i)
if a > 2:
    b.append(a)
for j in b:
    print(j, end=' ')
